Skip to main content
POST
/
api
/
portrait
/
analysis
/
face-key-points
Facial Landmarks
curl --request POST \
  --url https://www.ailabapi.com/api/portrait/analysis/face-key-points \
  --header 'Content-Type: multipart/form-data' \
  --header 'ailabapi-api-key: <api-key>' \
  --form image='@example-file' \
  --form 'max_face_num=<string>' \
  --form 'face_field=<string>'
{
  "request_id": "",
  "log_id": "",
  "error_code": 0,
  "error_code_str": "",
  "error_msg": "",
  "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
  },
  "result": {
    "face_num": "",
    "face_list": [
      {
        "face_token": "",
        "location": {
          "left": 0,
          "top": 0,
          "width": 0,
          "height": 0,
          "rotation": 0
        }
      }
    ],
    "face_probability": 0,
    "angle": [
      {
        "yaw": 0,
        "pitch": 0,
        "roll": 0
      }
    ],
    "age": 0,
    "gender": [
      {
        "type": "",
        "probability": 0
      }
    ],
    "landmark4": [
      {
        "x": 148.37,
        "y": 100.59
      },
      {
        "x": 234.82,
        "y": 90.52
      },
      {
        "x": 199.34,
        "y": 135.81
      },
      {
        "x": 203.17,
        "y": 179.29
      }
    ]
  }
}

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
image
file
max_face_num
string

The maximum number of faces to process. The default value is 1 (only the face with the largest area in the image is detected).

face_field
string

Returns more information about the face (by default only face_token, face frame, probability and rotation angle are returned).

  • age: Age information.
  • gender: Gender information.
  • landmark4: 4 feature points.
  • landmark72: 72 feature points.
  • landmark150: 150 feature points.
  • landmark201: 201 feature points.
  • Response

    200 - application/json

    Success

    The response is of type object.